﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SuperFox
{
    public partial class LoginSideBar : UserControl
    {
        public LoginSideBar()
        {
            InitializeComponent();
        }

        private void ShareTheLoveButton_Click(object sender, RoutedEventArgs e)
        {
            ModalPopup.Show(new ShareTheLove(), "SHARE THE LOVE");
        }

        public void StyleLinks(string linkContent)
        {
            foreach (HyperlinkButton lk in LinksPanel.Children)
            {


                if ((string)lk.Content == linkContent)
                {
                    lk.Style = this.Resources["LinkStyleRed"] as Style;
                }
                else
                {
                    lk.Style = this.Resources["LinkStyle"] as Style;
                }


            }

        }

        private void RelationshipLink_Click(object sender, RoutedEventArgs e)
        {
            (App.Current.RootVisual as MainPage).LoadContent(new Relationship());
            StyleLinks("Relationship Marketing");
        }

        private void MerchandiseProgramLink_Click(object sender, RoutedEventArgs e)
        {
            (App.Current.RootVisual as MainPage).LoadContent(new Login());
            StyleLinks("Merchandise Program");
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            StyleLinks("Merchandise Program");
        }
    }
}
